import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import { createPinia } from 'pinia'
import 'element-plus/dist/index.css'
//import './style.css'
import App from './App.vue'

// 导入路由
import router from './router/index.js'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

let app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

const pinia = createPinia()

//使用pinia
app.use(pinia)
// 使用路由
app.use(router)
// 使用elementPlus
app.use(ElementPlus)
// 挂载数据
app.mount('#app')
